package ro.cityprojects.adminloc.dao;

import org.springframework.stereotype.Repository;
import ro.cityprojects.adminloc.entities.Apartment;

import java.util.Set;

/**
 * ApartmentDAOImpl
 *
 * @author bogdan.solga
 *         <p/>
 *         Date: 17/10/13, time: 18:47
 */
@Repository
public class ApartmentDAOImpl extends BaseDAO<Integer, Apartment> implements ApartmentDAO {
    @Override
    public void save(Apartment entity) {
        saveEntity(entity);
    }

    @Override
    public Apartment get(Integer id) {
        return get(Apartment.class, id);
    }

    @Override
    public Set<Apartment> getAll(String filterName, String filterValue) {
        return getAll(filterName, filterValue, Apartment.class);
    }

    @Override
    public void update(Apartment entity) {
        updateEntity(entity);
    }

    @Override
    public void delete(Integer id) {
        deleteEntity(Apartment.class, id);
    }
}
